package org.practice.chart;

import java.util.Map;

public class PieChart extends FusionChart{
    /**标签<graph></graph>中定义的属性*/
    private String decimalPrecision="1";//
    private String rotateNames="0";//
    private String showNames="1";//
    private String showhovercap="0";//
    private String showPercentValues="1";

    private Map<String,String[]> dataMap;
    public PieChart(String caption){
        this.caption=caption;
    }

    @Override
    public String generateXML(Map<String, String[]> dataMap) {
        return null;
    }

    @Override
    public String generateXML() {
        StringBuffer xml=new StringBuffer(DataTransferUtil.getChartsTitleXml(this));
        xml.append(DataTransferUtil.getChartsSetXml(dataMap));
        return xml.append("</graph>").toString();
    }

    public Map<String, String[]> getDataMap() {
        return dataMap;
    }

    public void setDataMap(Map<String, String[]> dataMap) {
        this.dataMap = dataMap;
    }
}
